#include <iostream>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_ttf/SDL_ttf.h>

#include "main.hpp"
#include "AppConfigs.h"

static SDL_Window *window = NULL;
static SDL_Renderer *renderer = NULL;
static SDL_Event event;
static bool running = true;

int main(int argc, char* argv[])
{
    SDL_Init(SDL_INIT_VIDEO);
    TTF_Init();
    window = SDL_CreateWindow(WINDOW_TITLE, WINDOW_WIDTH, WINDOW_HEIGHT, SDL_WINDOW_RESIZABLE);
    if(window == NULL)
    {
        SDL_Log("SDL 创建窗口失败");
        SDL_Quit();
        return -1;
    }

    while (running)
    {
        while (SDL_PollEvent(&event))
        {
            if(event.type == SDL_EVENT_QUIT)
            {
                running = false;
            }
        }
    }
    SDL_DestroyWindow(window);
    SDL_Quit();
    TTF_Quit();

    return 0;
}

